<template>
  <div>
    <div class="page-header col-xs-offset-2 col-xs-8">
      <h2>Vue路由测试</h2>
    </div>
    <!-- 导航区域 -->
    <div class="col-xs-2 col-xs-offset-2">
      <!-- <a class="list-group-item" href="./about.html">About</a>
			<a class="list-group-item active" href="./home.html">Home</a> -->
      <router-link
        class="list-group-item"
        active-class="active"
        to="/home?color=pink"
        >home</router-link
      >
      <router-link class="list-group-item" active-class="active" to="/about"
        >About</router-link
      >
    </div>
    <!-- 展示区 -->
    <div class="col-xs-6 panel-body">
      <keep-alive :max="10" include="AboutComp,HomeComp">
        <router-view />
      </keep-alive>
      
    </div>
    <!-- 
      router-view是vue-router提供的全局组件 
      功能：
        会根据当前浏览器地址，遍历路由配置项，看哪个配置项匹配上当前浏览器地址
        然后渲染匹配上的路由组件
      -->
  </div>
</template>

<script>
export default {
  name: "App",
};
</script>

<style>
</style>